package sun.superstring.abstract1;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
// 抽象类，可以不写抽象方法
public abstract class A {
    private String name;
    private int age;

    /*public A() {
    }

    public A(String name, int age) {
        this.name = name;
        this.age = age;
    }*/

    public void eat() {
        System.out.println("吃东西");
    }
    // 抽象方法：必须用abstract修饰，没有方法体，只有方法声明
    public abstract void show();

    public void show1(){
        System.out.println("show1方法");
    }

    /*public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }*/
}
